package com.cl.core.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cl.core.pojo.PlatformMenus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @description menus mapper
 * @author liddhappy
 * @createTime 2022/12/3 20:51
 */
@Mapper
public interface PlatformMenusMapper  extends BaseMapper<PlatformMenus> {
    /**
     * 删除menu
     * @param menuId
     * @return
     */
    int deleteByPrimaryKey(Long menuId);

    /**
     * 插入menu
     * @param record
     * @return
     */
    int insert(PlatformMenus record);

    /**
     * 非空插入menu
     * @param record
     * @return
     */
    int insertSelective(PlatformMenus record);

    /**
     * 查询
     * @param menuId
     * @return
     */
    PlatformMenus selectByPrimaryKey(Long menuId);

    /**
     * 非空更新menu
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(PlatformMenus record);

    /**
     * 更新menu
     * @param record
     * @return
     */
    int updateByPrimaryKey(PlatformMenus record);

    /**
     * 查找分页内容
     * @param page 页面
     * @param query 查询对象
     * @return 菜单对象
     */
    IPage<PlatformMenus> paging(Page page, @Param("query") PlatformMenus query);
}